from fileinfo import FileInfo
class Recipe:
    """fileId: id of the file for this recipe
    file_info: info about the file of this recipe
    xids: list of the ids of the first blocks in the XOR recipe.
    yids: list of the ids of the second blocks in the XOR recipe.
    file contents = getBlock(xids[0]) ^ getBlock(yids[0]) || getBlock(xids[1]) ^ getBlock(yids[1]) ...
    """
    def __init__(self, file_id, file_info, xids, yids, block_size):
        self.file_id = file_id        
        self.xids = xids   
        self.yids = yids
        self.file_info = file_info
        self.block_size = block_size            
    def num_blocks(self):
        """return the number of blocks the file has"""
        return len(self.xids)


            